package com.firexxx.common.domain.query;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: TODO
 * @throws:
 * @author: zhuangzhang2
 * @date: 2019/12/26 15:29
 */
public class QueryRegistry<T> {

    private final static Map<Class, Object> beans = new HashMap<>();

    public synchronized static <T> void addBean(Class<T> c, T bean){
        beans.put(c, bean);
    }

    public static <T> T getBean(Class<T> c){
        return (T)beans.get(c);
    }

}